import Vue from 'vue'
import store from '../store'
Vue.directive('perm', function (el, binding) {
  if (store.state.permission.permlist.indexOf(binding.value) === -1) {
    el.style.display = 'none'
  } else {
    el.style.display = ''
  }
  //   const isAdmin = store.state.user.userInfo.roleId == 100
  //   if (!isAdmin && !store.state.user.permission[binding.value]) {
  //     el.style.display = 'none'
  //   }
})
